package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.service.StockInfoService;
import com.gxa.service.TransferOrderService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Controller
@Api(value = "库存信息数据test",tags = "库存信息数据接口API")
public class StockInfoController {
    R r = new R();
    @Autowired(required = false)
    private StockInfoService stockInfoService;

    @RequestMapping(value = "/queryStock",method = RequestMethod.POST)
    @ApiOperation(value = "查询库存接口",notes = "查询库存",httpMethod = "POST", response = R.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R queryStock(@RequestBody @ApiParam(name = "map",value = "用户名和密码",required = true) Map map) {
        System.out.println(map);
        R r = stockInfoService.queryStock(map);
        return r;
    }
}
